package com.ssy.lingxi.purchase.entity.tender;

import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.*;
import java.io.Serializable;

/**
 * 招标物料表
 * @author jw.chen
 * @version 2.0.0
 * @date 2021/3/1
 */
@Getter
@Setter
@Entity
@Table(schema = "public", name = "purchase_submit_tender_file")
public class SubmitTenderFile implements Serializable {
    private static final long serialVersionUID = -3570144561148968115L;
    /**
     * 主键id
     */
    @Id
    @GeneratedValue(strategy= GenerationType.SEQUENCE, generator="submit_tender_file_seq")
    @SequenceGenerator(sequenceName="purchase_submit_tender_file_seq", name="submit_tender_file_seq",allocationSize = 1)
    private Long id;

    /**
     * 投标id
     */
    @JsonIgnore
    @ManyToOne(cascade = {CascadeType.PERSIST})
    @JoinColumn(name="submitTenderId",referencedColumnName = "id")
    private SubmitTender submitTender;

    /**
     * 文件名
     */
    @Column(columnDefinition = "varchar(100)", nullable = false)
    private String name;

    /**
     * 文件路径
     */
    @Column(columnDefinition = "varchar(500)", nullable = false)
    private String url;

}
